home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Tech Arsenal 1
/
Tech Arsenal (Arsenal Computer).ISO
/
tek-03
/
pbwndo.zip
/
PBMICE.INC
< prev
next >
Wrap
Text File
|
1991-09-01
|
4KB
|
116 lines
' PbMice.Inc
$IF 0
This is the loader FOR PbMouse.Obj AND has the Declare's and Publics
necessary TO impliment this into you programs.
(c) 1991 Barry Erick
$ENDIF
DEFINT a-z
DECLARE Function MouseInstalled()
DECLARE SUB InitMouse(INTEGER,INTEGER)
DECLARE SUB Mouse(INTEGER,INTEGER,INTEGER,INTEGER)
DECLARE SUB ShowMouse()
DECLARE SUB HideMouse()
DECLARE SUB GetMousePosAndButton(INTEGER,INTEGER,INTEGER)
DECLARE SUB SetMousePointerPos(INTEGER,INTEGER)
DECLARE SUB GetbuttonPress(INTEGER,INTEGER,INTEGER,INTEGER)
DECLARE SUB GetButtonRel(INTEGER,INTEGER,INTEGER,INTEGER)
DECLARE SUB SetLimits(INTEGER,INTEGER,INTEGER,INTEGER)
DECLARE SUB MakeGraphCursor(INTEGER,INTEGER,INTEGER)
DECLARE SUB SetTextPointerType(INTEGER,INTEGER,INTEGER,INTEGER)
DECLARE SUB RealMouseCounter(INTEGER,INTEGER)
DECLARE SUB SetMickeys(INTEGER,INTEGER)
DECLARE SUB SetExclusion(INTEGER,INTEGER,INTEGER,INTEGER)
DECLARE SUB SetDouble(INTEGER)
DECLARE SUB SetMouseSens(INTEGER,INTEGER,INTEGER)
DECLARE SUB GetMouseSens(INTEGER,INTEGER,INTEGER)
DECLARE SUB SetMouseIntRate(INTEGER)
DECLARE SUB MousePage(INTEGER)
DECLARE SUB DisableMouse(INTEGER,INTEGER,INTEGER)
DECLARE SUB EnableMouse()
DECLARE SUB ResetMouseDriver(INTEGER,INTEGER)
DECLARE SUB MouseLanguage(INTEGER,INTEGER)
DECLARE SUB GetMouseInfo(INTEGER,INTEGER)
DECLARE SUB ReadMouse()
DECLARE SUB SetMouseInterruptService(INTEGER)
DECLARE SUB ResetMouse()
DECLARE SUB MouseClock(Integer)
DECLARE SUB MouseExit()
DECLARE FUNCTION DoubleClick%(INTEGER,INTEGER,INTEGER,INTEGER)
DECLARE FUNCTION MouseClick%()
DECLARE FUNCTION LeftButtonDown%()
DECLARE FUNCTION RightButtonDown%()
PUBLIC Cursor% 'Not used anywhere.. is declared external in obj code
PUBLIC Mice% 'Public variable in Obj.. 0=No Mouse, else mouse present
PUBLIC MiceButtons% 'ditto, 0 = no buttons!, else.. number of buttons
PUBLIC CrtMode%,CrtCols%,CrtRows%,CursorMode%
Mice% = 0
MiceButtons% = 0
SeeMouse% = 0 '0 means visible. but this will be set by init mouse
PUBLIC ZeroMouse%,TextMouse%,HercGraphMode%
PUBLIC MouseAreaX1%,MouseAreaX2%
PUBLIC MouseareaY1%,MouseAreaY2%
PUBLIC MouseTextWidth%, MouseTextHeight%
PUBLIC MouseClicked%
PUBLIC MaxCrtX%,MaxCrtY%
PUBLIC ClickMouseX%,ClickMouseY%,MouseButtons%,Mice%
PUBLIC MouseClickButton%,Mousey%,MouseX%
PUBLIC MouseBusy%
PUBLIC MaxMouseTextShape%
PUBLIC ClickLTime&
PUBLIC ClickRTime&
Public ClickCTime&
public MouseEventFlag%
Public MouseEventButtonStatus%
Public MouseEventX%
Public MouseEventY%
Public MouseEventYMickeys%
Public MouseEventXMickeys%
PUBLIC SeeMouse%
PUBLIC SetLimitx%,SetLimity%,SetLimitx1%,SetLimitY1%
SUB GetVideoMode
DEF SEG= &H40 'get various modes from the bios
CrtMode% = PEEK(&H49) 'standard video modes.. see any bios book.
CrtCols% = PeekI(&h4a)'number of columns in current mode
CrtRows% = PEEK(&H84) 'number of rows in current mode
CursorMode% = PeekI(&H60) 'size of cursor. start,ending lines in 2 bytes
DEF SEG
END SUB
maxCRTx% = 80 'default max crt columns
MaxCrtY% = 25 'default max crt rows (43 or 50 if ega graphics
MouseTextWidth% = 8 ' these are constants, but are made
MouseTextHeight% = 8 ' integers so they do not have to be
MouseLeftButton% = 1 ' declared again in the unit. Constants
MouseRightButton% = 2 ' are not global thru units
MouseCenterButton% = 4
MouseBothButtons% = 3
MaxMouseTextShape% = 0'initialized by the obj file
MaxMouseGraphShape% = 0'this is init by the obj file, also
MouseHooked% = 0 'this is used by the obj file, also
MouseBusy% = 0 ' as is this.
CALL GetVideoMode
Select Case CRTRows%
Case 24
EGA43% = %False
VGA50% = %False
Case 42
EGA43%=%True
VGA50%=%False
Case 49
EGA43%=%False
VGA50%=%True
End Select
IF EGA43% then MaxCRTY% = 43 'for ega 43 line modes
IF VGA50% then MaxCRTY% = 50 'for vga 50 line modes
ClickLTime& = 0 'this allows the time to be known when buttons hit
ClickCTime& = 0 'and is used by the obj file and the pbu
ClickRTime& = 0
$LINK "PbMiceUn.Pbu"
$LINK "PBMouse.obj" 'THIS CAN NOT BE THE LAST ITEM IN THE $INCLUDE